package cn.walls1717.wallsmall.order.util;

import cn.walls1717.wallsmall.common.pojo.vo.MemberRespVO;

/**
 * ThreadLocal用户信息
 *
 * @author walls1717
 * @since 2022/11/15 11:05
 **/
public class UserHandler {
    private static final ThreadLocal<MemberRespVO> threadLocal = new ThreadLocal<>();

    public static void set(MemberRespVO memberRespVO) {
        threadLocal.set(memberRespVO);
    }

    public static MemberRespVO get() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }
}
